package com.baizhi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;

/**
 * 动态(Feed)表实体类
 *
 * @author makejava
 * @since 2021-09-27 09:35:41
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@TableName("feed")
@SuppressWarnings("serial")
public class Feed extends Model<Feed> {
    @TableId(type = IdType.AUTO, value = "id")
    private Integer id;

    @TableField("user_id")
    private Integer userId;

    //类型{1: 'normal', 2: 'video'}
    @TableField("type")
    private String type;

    //视频id(type = "video")
    @TableField("video_id")
    private Integer videoId;

    //文本内容(type = "normal")
    @TableField("content")
    private String content;

    //图片列表(type = "normal")	
    @TableField("images")
    private String images;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("created_at")
    private Date createdAt;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("updated_at")
    private Date updatedAt;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("deleted_at")
    private Date deletedAt;


}

